<template>
	<div>
		<Row>
			<Col span="12">123</Col>
			<Col span="12">
			<div>
				<Row>
					<Col span="4">账号</Col>
					<Col span="8">
					<Input v-model="account" placeholder="请输入账号" style="width: 300px"></Input>
					</Col>
				</Row>
				<br>
				<Row>
					<Col span="4">密码</Col>
					<Col span="8">
					<Input v-model="password" type="password" placeholder="请输入密码" style="width: 300px"></Input>
					</Col>
				</Row>
				<br>
				<Row>
					<Col span="12">
					<Button type="primary" v-on:click="loginIn">登录</Button>
					</Col>
				</Row>
			</div>
			</Col>
		</Row>

	</div>

</template>
<script>
	export default {
		data() {
			return {
				account: '',
				password: ''
			}
		},
		created() {

		},
		methods: {
			loginIn() {
				let _that = this
				let param = {
					account: this.account,
					password: this.password
				}
				this.$tldJsonp({
					isLayer: true,
					url: this.$domain + "/tld/pub/login/loginIn.json",
					params: param,
					successFc: (response) => {
						var storage = window.localStorage;
						storage.setItem("userId", response.data.data)
						this.$Message.success({
							content: '登陆成功，欢迎',
							onClose: function() {
								_that.$router.push({
									path: '/tld/index'
								});
							}
						});
					}
				});
			}
		}
	}
</script>
<style>

</style>